@include('Home.head')
<style>
    .qrcode-qrcode {
        width:160px;
        height:160px;
        padding: 16px;
        border-radius: 50%;
        border: solid 3px #FBC44D;
    }
</style>
<body>
<div class="container" id="app">
    @include('Home.member.header')


    <div class="my-nav-bar">
        <ol class="am-breadcrumb">
            <li><a href="#">首页</a></li>
            <li><a href="#">今日签到</a></li>
        </ol>
    </div>
    <div class="am-cf cart-panel">
        <div class="withdrawals-panel">
            {{--<p class="am-text-center">我的推广二维码</p>--}}
            <p class="am-text-center" v-on:click="sign()" v-show="signStatus == 2"><img src="/img/home/user/sign.jpg" class="qrcode-qrcode" /></p>

            <p class="am-text-center" v-on:click="sign()" v-show="signStatus == 1"><img src="/img/home/user/setsign.jpg" class="qrcode-qrcode" /></p>
            {{--<hr data-am-widget="divider" style="" class="am-divider am-divider-default"/>--}}
            {{--<p class="am-text-left">我的推广代码</p>--}}<br>

        </div>
    </div>

    @include('Home.foot')
</div>
</body>
<script>
    var app = new Vue({
        el: "#app",
        data: {
            title: '会员中心',
            signStatus:'',
        },
        methods: {
            //初始化 系统管理员列表
            initialize: function () {
                $.post("/home/member/findsign", {'_token': '{{csrf_token()}}'}, function (res) {
                        app.signStatus = res.status;
                });
            },
            sign:function(){
                $.post("/home/member/dosign", {'_token': '{{csrf_token()}}'}, function (res) {
                    if (res.code) {
                        layer.msg(res.data);
                        app.signStatus = res.status;
                    } else {
                        layer.msg(res.data);
                    }
                });
            }

        },
        //自动执行
        mounted: function () {
            this.initialize();
        },
    })
</script>
</html>
